<?php /* Smarty version 2.6.26, created on 2012-05-12 14:59:47
         compiled from controllers%5Cadd_listing.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'rlHook', 'controllers\\add_listing.tpl', 9, false),array('modifier', 'cat', 'controllers\\add_listing.tpl', 41, false),array('modifier', 'nl2br', 'controllers\\add_listing.tpl', 113, false),array('modifier', 'replace', 'controllers\\add_listing.tpl', 238, false),array('modifier', 'regex_replace', 'controllers\\add_listing.tpl', 632, false),)), $this); ?>
<!-- add listing -->

<script type="text/javascript" src="<?php echo @RL_LIBS_URL; ?>
jquery/numeric.js"></script>
<script type="text/javascript" src="<?php echo @RL_LIBS_URL; ?>
jquery/jquery.qtip.js"></script>
<script type="text/javascript">flynax.qtip();</script>
<script type="text/javascript" src="<?php echo @RL_LIBS_URL; ?>
jquery/jquery.textareaCounter.js"></script>
<script type="text/javascript" src="<?php echo @RL_LIBS_URL; ?>
ckeditor/ckeditor.js"></script>

<?php echo rlHook::load(array('name' => 'addListingTopTpl'), $this);?>


<?php if (! $this->_tpl_vars['no_access']): ?>

	<!-- steps -->
	<table class="steps">
	<tr>
		<?php $this->assign('allow_link', true); ?>
		<?php $_from = $this->_tpl_vars['steps']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['stepsF'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['stepsF']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['step_key'] => $this->_tpl_vars['step']):
        $this->_foreach['stepsF']['iteration']++;
?>
			<?php if ($this->_tpl_vars['cur_step'] == $this->_tpl_vars['step_key'] || ! $this->_tpl_vars['cur_step']): ?><?php $this->assign('allow_link', false); ?><?php endif; ?>
			<td id="step_<?php echo $this->_tpl_vars['step_key']; ?>
" class="<?php if (($this->_foreach['stepsF']['iteration'] <= 1)): ?>active<?php endif; ?><?php if (! $this->_tpl_vars['show_step_caption'] && ($this->_foreach['stepsF']['iteration'] == $this->_foreach['stepsF']['total'])): ?> last<?php endif; ?>">
				<div><a href="<?php if ($this->_tpl_vars['allow_link']): ?><?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
<?php if ($this->_tpl_vars['step_key'] == 'category'): ?>.html?edit<?php else: ?>/<?php echo $this->_tpl_vars['category']['Path']; ?>
/<?php echo $this->_tpl_vars['steps'][$this->_tpl_vars['step_key']]['path']; ?>
.html<?php endif; ?><?php else: ?>?page=<?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
&amp;id=<?php echo $this->_tpl_vars['category']['ID']; ?>
&amp;step=<?php echo $this->_tpl_vars['steps'][$this->_tpl_vars['step_key']]['path']; ?>
<?php if ($this->_tpl_vars['step_key'] == 'category'): ?>&amp;edit<?php endif; ?><?php endif; ?><?php else: ?>javascript:void(0)<?php endif; ?>" title="<?php echo $this->_tpl_vars['step']['name']; ?>
"><?php if ($this->_tpl_vars['step']['caption']): ?><b><?php echo $this->_foreach['stepsF']['iteration']; ?>
</b><?php if ($this->_tpl_vars['show_step_caption']): ?>. <?php echo $this->_tpl_vars['step']['name']; ?>
<?php endif; ?><?php else: ?><?php echo $this->_tpl_vars['step']['name']; ?>
<?php endif; ?></a></div>
			</td>
		<?php endforeach; endif; unset($_from); ?>
	</tr>
	</table>
	<!-- steps -->

	<div class="highlight clear">
		<?php if (! $this->_tpl_vars['cur_step']): ?>
			<!-- print sections/categories tree -->
			<div class="area_category step_area">
				<div class="caption"><?php echo $this->_tpl_vars['lang']['select_category']; ?>
</div>
				
				<?php if (! $this->_tpl_vars['sections']): ?>
					<?php echo $this->_tpl_vars['lang']['add_listing_deny']; ?>

				<?php else: ?>
					<div class="dark" style="padding-bottom: 12px;"><?php echo $this->_tpl_vars['lang']['add_listing_notice']; ?>
</div>
				
					<div class="tree">
						<?php $_from = $this->_tpl_vars['sections']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['section']):
?>
							<?php if (! $this->_tpl_vars['section']['Admin_only']): ?>
								<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'fieldset_header.tpl') : smarty_modifier_cat($_tmp, 'fieldset_header.tpl')), 'smarty_include_vars' => array('id' => $this->_tpl_vars['section']['ID'],'name' => $this->_tpl_vars['section']['name'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
								
								<?php if (! empty ( $this->_tpl_vars['section']['Categories'] )): ?>
									<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'category_level.tpl') : smarty_modifier_cat($_tmp, 'category_level.tpl')), 'smarty_include_vars' => array('categories' => $this->_tpl_vars['section']['Categories'],'first' => true)));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
								<?php else: ?>
									<?php echo $this->_tpl_vars['lang']['no_items_in_sections']; ?>

								<?php endif; ?>
								
								<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'fieldset_footer.tpl') : smarty_modifier_cat($_tmp, 'fieldset_footer.tpl')), 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
							<?php endif; ?>
						<?php endforeach; endif; unset($_from); ?>
					</div>
					
					<script type="text/javascript">
					<?php echo '
					
					$(document).ready(function(){
						flynax.treeLoadLevel();
					});
					
					'; ?>

					</script>
				<?php endif; ?>
			</div>
			<!-- print sections/categories tree end -->
		<?php else: ?>
			<!-- select a plan -->
			<?php if ($this->_tpl_vars['cur_step'] == 'plan'): ?>
			<div class="area_plan step_area hide">
				<div class="caption"><?php echo $this->_tpl_vars['lang']['select_plan']; ?>
</div>
				
				<form method="post" action="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
/<?php echo $this->_tpl_vars['category']['Path']; ?>
/<?php echo $this->_tpl_vars['steps'][$this->_tpl_vars['cur_step']]['path']; ?>
.html<?php else: ?>?page=<?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
&amp;id=<?php echo $this->_tpl_vars['category']['ID']; ?>
&amp;step=<?php echo $this->_tpl_vars['steps'][$this->_tpl_vars['cur_step']]['path']; ?>
<?php endif; ?>">
					<input type="hidden" name="step" value="plan" />
					
					<ul class="plans">
					<?php $_from = $this->_tpl_vars['plans']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['plansF'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['plansF']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['plan']):
        $this->_foreach['plansF']['iteration']++;
?>
					<li <?php if ($this->_tpl_vars['plan']['ID'] == $_POST['plan']): ?>class="active"<?php endif; ?>>
						<table class="sTable">
						<tr>
							<td class="radio"><input <?php if ($this->_tpl_vars['plan']['Limit'] > 0 && $this->_tpl_vars['plan']['Using'] == 0 && $this->_tpl_vars['plan']['Using'] != ''): ?>disabled="disabled"<?php endif; ?> id="plan_<?php echo $this->_tpl_vars['plan']['ID']; ?>
" type="radio" name="plan" value="<?php echo $this->_tpl_vars['plan']['ID']; ?>
" <?php if ($this->_tpl_vars['plan']['ID'] == $_POST['plan']): ?>checked="checked"<?php endif; ?> /></td>
							<td class="label">
								<div <?php if ($this->_tpl_vars['plan']['Limit'] > 0 && $this->_tpl_vars['plan']['Using'] == 0 && $this->_tpl_vars['plan']['Using'] != ''): ?>class="o60"<?php endif; ?>>
									<div class="tile" <?php if ($this->_tpl_vars['plan']['Color']): ?>style="background-color: #<?php echo $this->_tpl_vars['plan']['Color']; ?>
;"<?php endif; ?>></div>
									<div class="bg" <?php if ($this->_tpl_vars['plan']['Color']): ?>style="background-color: #<?php echo $this->_tpl_vars['plan']['Color']; ?>
;"<?php endif; ?>>
										<div class="price"><?php if (isset ( $this->_tpl_vars['plan']['Listings_remains'] )): ?>&rarr;<?php else: ?><?php if ($this->_tpl_vars['plan']['Price'] > 0): ?><?php if ($this->_tpl_vars['config']['system_currency_position'] == 'before'): ?><?php echo $this->_tpl_vars['config']['system_currency']; ?>
<?php endif; ?><?php echo $this->_tpl_vars['plan']['Price']; ?>
<?php if ($this->_tpl_vars['config']['system_currency_position'] == 'after'): ?><?php echo $this->_tpl_vars['config']['system_currency']; ?>
<?php endif; ?><?php else: ?><?php echo $this->_tpl_vars['lang']['free']; ?>
<?php endif; ?><?php endif; ?></div>
										<div class="type"><?php $this->assign('l_type', ((is_array($_tmp=$this->_tpl_vars['plan']['Type'])) ? $this->_run_mod_handler('cat', true, $_tmp, '_plan_short') : smarty_modifier_cat($_tmp, '_plan_short'))); ?><?php echo $this->_tpl_vars['lang'][$this->_tpl_vars['l_type']]; ?>
</div>
									</div>
								</div>
							</td>
							<td class="info">
								<table class="sTable<?php if ($this->_tpl_vars['plan']['Limit'] > 0 && $this->_tpl_vars['plan']['Using'] == 0 && $this->_tpl_vars['plan']['Using'] != ''): ?> o60<?php endif; ?>">
								<tr>
									<td class="caption"><div><?php echo $this->_tpl_vars['plan']['name']; ?>
</div></td>
									<td>
										<ul class="features">
											<li class="period" title="<?php echo $this->_tpl_vars['lang']['listing_live']; ?>
"><?php if ($this->_tpl_vars['plan']['Listing_period']): ?><?php echo $this->_tpl_vars['plan']['Listing_period']; ?>
 <?php echo $this->_tpl_vars['lang']['days']; ?>
<?php else: ?><?php echo $this->_tpl_vars['lang']['unlimited']; ?>
<?php endif; ?></li>
											<?php if ($this->_tpl_vars['plan']['Image'] || $this->_tpl_vars['plan']['Image_unlim']): ?><li class="pics" title="<?php echo $this->_tpl_vars['lang']['images_number']; ?>
"><?php if ($this->_tpl_vars['plan']['Image_unlim']): ?><?php echo $this->_tpl_vars['lang']['unlimited']; ?>
<?php else: ?><?php echo $this->_tpl_vars['plan']['Image']; ?>
<?php endif; ?></li><?php endif; ?>
											<?php if ($this->_tpl_vars['plan']['Video'] || $this->_tpl_vars['plan']['Video_unlim']): ?><li class="video" title="<?php echo $this->_tpl_vars['lang']['number_of_videos']; ?>
"><?php if ($this->_tpl_vars['plan']['Video_unlim']): ?><?php echo $this->_tpl_vars['lang']['unlimited']; ?>
<?php else: ?><?php echo $this->_tpl_vars['plan']['Video']; ?>
<?php endif; ?></li><?php endif; ?>
										</ul>
									</td>
									<?php if (isset ( $this->_tpl_vars['plan']['Listings_remains'] )): ?>	
									<td class="ralign">
										<div class="status" title="<?php echo $this->_tpl_vars['lang']['package_purchased']; ?>
"><?php echo $this->_tpl_vars['lang']['available']; ?>
</div>
									</td>
									<?php endif; ?>
								</tr>
								</table>
								
								<div class="desc">
									<?php if ($this->_tpl_vars['plan']['Limit'] > 0 && $this->_tpl_vars['plan']['Using'] == 0 && $this->_tpl_vars['plan']['Using'] != ''): ?>
										<b><?php echo $this->_tpl_vars['lang']['plan_limit_using_deny']; ?>
</b>
									<?php else: ?>
										<div class="text"><?php echo ((is_array($_tmp=$this->_tpl_vars['plan']['des'])) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp)); ?>
</div>
																					<?php if ($this->_tpl_vars['plan']['Featured'] && $this->_tpl_vars['plan']['Advanced_mode']): ?>
												<div id="featured_option_<?php echo $this->_tpl_vars['plan']['ID']; ?>
" class="featured_option hide">
													<div><?php echo $this->_tpl_vars['lang']['feature_mode_caption']; ?>
</div>
													<label>
														<input class="<?php if ($_POST['listing_type'] == 'standard' || ! $_POST['listing_type']): ?>checked<?php endif; ?><?php if ($this->_tpl_vars['plan']['Package_ID'] && empty ( $this->_tpl_vars['plan']['Standard_remains'] ) && $this->_tpl_vars['plan']['Standard_listings'] != 0): ?> disabled<?php endif; ?>" type="radio" name="listing_type" value="standard" />
														<?php echo $this->_tpl_vars['lang']['standard_listing']; ?>
 (<b><?php if ($this->_tpl_vars['plan']['Standard_listings'] == 0): ?><?php echo $this->_tpl_vars['lang']['unlimited']; ?>
<?php else: ?><?php if (isset ( $this->_tpl_vars['plan']['Listings_remains'] )): ?><?php if (empty ( $this->_tpl_vars['plan']['Standard_remains'] )): ?><?php echo $this->_tpl_vars['lang']['used_up']; ?>
<?php else: ?><?php echo $this->_tpl_vars['plan']['Standard_remains']; ?>
<?php endif; ?><?php else: ?><?php echo $this->_tpl_vars['plan']['Standard_listings']; ?>
<?php endif; ?><?php endif; ?></b>)
													</label>
													<label>
														<input class="<?php if ($_POST['listing_type'] == 'featured'): ?>checked<?php endif; ?><?php if ($this->_tpl_vars['plan']['Package_ID'] && empty ( $this->_tpl_vars['plan']['Featured_remains'] ) && $this->_tpl_vars['plan']['Featured_listings'] != 0): ?> disabled<?php endif; ?>" type="radio" name="listing_type" value="featured" /> 
														<?php echo $this->_tpl_vars['lang']['featured_listing']; ?>
 (<b><?php if ($this->_tpl_vars['plan']['Featured_listings'] == 0): ?><?php echo $this->_tpl_vars['lang']['unlimited']; ?>
<?php else: ?><?php if (isset ( $this->_tpl_vars['plan']['Listings_remains'] )): ?><?php if (empty ( $this->_tpl_vars['plan']['Featured_remains'] )): ?><?php echo $this->_tpl_vars['lang']['used_up']; ?>
<?php else: ?><?php echo $this->_tpl_vars['plan']['Featured_remains']; ?>
<?php endif; ?><?php else: ?><?php echo $this->_tpl_vars['plan']['Featured_listings']; ?>
<?php endif; ?><?php endif; ?></b>)
													</label>
												</div>
											<?php endif; ?>
																			<?php endif; ?>
								</div>
							</td>
						</tr>
						</table>
					</li>
					<?php endforeach; endif; unset($_from); ?>
					</ul>
					
					<table class="submit">
					<tr>
						<td class="name button">
							<a href="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
.html?edit<?php else: ?>?page=<?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
&amp;edit<?php endif; ?>" class="dark_12"><?php if (@RL_LANG_DIR == 'ltr'): ?>&larr;<?php else: ?>&rarr;<?php endif; ?> <?php echo $this->_tpl_vars['lang']['perv_step']; ?>
</a>
						</td>
						<td class="field button"><span class="arrow"><input type="submit" value="<?php echo $this->_tpl_vars['lang']['next_step']; ?>
" id="plans_submit" /><label for="plans_submit" class="right">&nbsp;</label></span></td>
					</tr>
					</table>
				</form>
				
				<script type="text/javascript">
				var plans = Array();
				var selected_plan_id = 0;
				var last_plan_id = 0;
				<?php $_from = $this->_tpl_vars['plans']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['plan']):
?>
				plans[<?php echo $this->_tpl_vars['plan']['ID']; ?>
] = new Array();
				plans[<?php echo $this->_tpl_vars['plan']['ID']; ?>
]['Key'] = '<?php echo $this->_tpl_vars['plan']['Key']; ?>
';
				plans[<?php echo $this->_tpl_vars['plan']['ID']; ?>
]['Cross'] = <?php echo $this->_tpl_vars['plan']['Cross']; ?>
;
				plans[<?php echo $this->_tpl_vars['plan']['ID']; ?>
]['Featured'] = <?php echo $this->_tpl_vars['plan']['Featured']; ?>
;
				plans[<?php echo $this->_tpl_vars['plan']['ID']; ?>
]['Advanced_mode'] = <?php echo $this->_tpl_vars['plan']['Advanced_mode']; ?>
;
				plans[<?php echo $this->_tpl_vars['plan']['ID']; ?>
]['Standard_listings'] = <?php echo $this->_tpl_vars['plan']['Standard_listings']; ?>
;
				plans[<?php echo $this->_tpl_vars['plan']['ID']; ?>
]['Featured_listings'] = <?php echo $this->_tpl_vars['plan']['Featured_listings']; ?>
;
				<?php endforeach; endif; unset($_from); ?>
	
				<?php echo '
		
				$(document).ready(function(){
					$(\'ul.plans>li\').mouseenter(function(){
						$(this).find(\'ul.features\').show();
						$(\'ul.plans>li\').find(\'input[name=plan]:checked\').parent().parent().parent().parent().parent().removeClass(\'active\');
					}).mouseleave(function(){
						$(this).find(\'ul.features\').hide();
						$(\'ul.plans>li\').find(\'input[name=plan]:checked\').parent().parent().parent().parent().parent().addClass(\'active\');
					}).click(function(){
						if ( $(this).find(\'input[name=plan]\').is(\':not(:disabled)\') )
						{
							$(\'ul.plans>li\').removeClass(\'active\');
							$(this).addClass(\'active\');
							planClickHandler($(this).find(\'input[name=plan]\'));
							$(this).find(\'input[name=plan]\').attr(\'checked\', true);
						}
					});
					
					if ( $(\'ul.plans input[name=plan]:checked\').length == 0 )
					{
						$(\'ul.plans input[name=plan]:not(:disabled):first\').attr(\'checked\', true);
					}
					
					planClickHandler($(\'ul.plans input[name=plan]:checked\'));
					$(\'ul.plans input[name=plan]:checked\').parent().parent().parent().parent().parent().addClass(\'active\');
				});
				
				var planClickHandler = function(obj){
					if ( obj.length == 0 )
						return;
						
					selected_plan_id = $(obj).attr(\'id\').split(\'_\')[1];
					
					if ( last_plan_id == selected_plan_id )
						return;
					
					last_plan_id = selected_plan_id;
					
					$(\'div.featured_option\').hide();
					$(\'div.featured_option\').prev().show();
					$(\'div.featured_option input\').attr(\'disabled\', true);
					
					if ( plans[selected_plan_id][\'Featured\'] && plans[selected_plan_id][\'Advanced_mode\'] )
					{
						$(\'#featured_option_\'+selected_plan_id).prev().hide();
						$(\'#featured_option_\'+selected_plan_id).show();
						$(\'#featured_option_\'+selected_plan_id+\' input\').attr(\'disabled\', false);
						$(\'#featured_option_\'+selected_plan_id+\' input.disabled\').attr(\'disabled\', true);
						$(\'#featured_option_\'+selected_plan_id+\' input:not(.disabled):first\').attr(\'checked\', true);
						$(\'#featured_option_\'+selected_plan_id+\' input.checked\').attr(\'checked\', true);
					}
				}
				
				'; ?>

				</script>
			</div>
			<?php endif; ?>
			<!-- select a plan end -->
			
			<!-- fill in form -->
			<?php if ($this->_tpl_vars['cur_step'] == 'form'): ?>
			<div class="area_form step_area hide">
				<div class="caption"><?php echo $this->_tpl_vars['lang']['fill_out_form']; ?>
</div>
				
				<form enctype="multipart/form-data" method="post" action="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
/<?php echo $this->_tpl_vars['category']['Path']; ?>
/<?php echo $this->_tpl_vars['steps'][$this->_tpl_vars['cur_step']]['path']; ?>
.html<?php else: ?>?page=<?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
&amp;id=<?php echo $this->_tpl_vars['category']['ID']; ?>
&amp;step=<?php echo $this->_tpl_vars['steps'][$this->_tpl_vars['cur_step']]['path']; ?>
<?php endif; ?>">
					<input type="hidden" name="step" value="form" />
					<input type="hidden" name="fromPost" value="1" />
					
					<!-- crossed categories -->
					<?php if ($this->_tpl_vars['plan_info']['Cross']): ?>
						<input type="hidden" name="crossed_done" value="<?php if ($_SESSION['add_listing']['crossed_done']): ?>1<?php endif; ?>" />
					
						<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'fieldset_header.tpl') : smarty_modifier_cat($_tmp, 'fieldset_header.tpl')), 'smarty_include_vars' => array('id' => 'crossed','name' => $this->_tpl_vars['lang']['crossed_categories'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
						<div class="auth">
							<div style="padding: 0 0 10px 0;">
								<div class="dark" id="cc_text"><?php echo ((is_array($_tmp=$this->_tpl_vars['lang']['crossed_top_text'])) ? $this->_run_mod_handler('replace', true, $_tmp, '[number]', '<b id="cc_number"></b>') : smarty_modifier_replace($_tmp, '[number]', '<b id="cc_number"></b>')); ?>
</div>
								<div class="dark hide" id="cc_text_denied"><?php echo $this->_tpl_vars['lang']['crossed_top_text_denied']; ?>
</div>
							</div>
							
							<!-- print sections/categories tree -->
							<div id="crossed_tree" class="tree<?php if ($_POST['crossed_done']): ?> hide<?php endif; ?>">
							<?php $_from = $this->_tpl_vars['sections']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['section']):
?>
								<?php if (! $this->_tpl_vars['section']['Admin_only']): ?>
									<?php $this->assign('type_page_key', ((is_array($_tmp='lt_')) ? $this->_run_mod_handler('cat', true, $_tmp, $this->_tpl_vars['section']['Key']) : smarty_modifier_cat($_tmp, $this->_tpl_vars['section']['Key']))); ?>
									<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'fieldset_header.tpl') : smarty_modifier_cat($_tmp, 'fieldset_header.tpl')), 'smarty_include_vars' => array('id' => $this->_tpl_vars['section']['ID'],'name' => $this->_tpl_vars['section']['name'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
									
									<?php if (! empty ( $this->_tpl_vars['section']['Categories'] )): ?>
										<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'category_level_crossed.tpl') : smarty_modifier_cat($_tmp, 'category_level_crossed.tpl')), 'smarty_include_vars' => array('categories' => $this->_tpl_vars['section']['Categories'],'first' => true)));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
									<?php else: ?>
										<div class="dark"><?php echo $this->_tpl_vars['lang']['no_items_in_sections']; ?>
</div>
									<?php endif; ?>
								
									<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'fieldset_footer.tpl') : smarty_modifier_cat($_tmp, 'fieldset_footer.tpl')), 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
								<?php endif; ?>
							<?php endforeach; endif; unset($_from); ?>
							</div>
							<!-- print sections/categories tree end -->
							
							<ul class="hide" id="crossed_selected"><li class="first dark"><b><?php echo $this->_tpl_vars['lang']['selected_crossed_categories']; ?>
</b></li></ul>
							<input id="crossed_button" type="button" value="<?php if ($_POST['crossed_done']): ?><?php echo $this->_tpl_vars['lang']['manage']; ?>
<?php else: ?><?php echo $this->_tpl_vars['lang']['done']; ?>
<?php endif; ?>" />
						</div>
						<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'fieldset_footer.tpl') : smarty_modifier_cat($_tmp, 'fieldset_footer.tpl')), 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
						
						<script type="text/javascript">
						var plans = Array();
						var selected_plan_id = <?php if ($_SESSION['add_listing']['plan_id']): ?><?php echo $_SESSION['add_listing']['plan_id']; ?>
<?php else: ?>0<?php endif; ?>;
						var ca_post = <?php if ($this->_tpl_vars['crossed']): ?>[<?php $_from = $this->_tpl_vars['crossed']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['crossedF'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['crossedF']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['crossed_cat']):
        $this->_foreach['crossedF']['iteration']++;
?>['<?php echo $this->_tpl_vars['crossed_cat']; ?>
']<?php if (! ($this->_foreach['crossedF']['iteration'] == $this->_foreach['crossedF']['total'])): ?>,<?php endif; ?><?php endforeach; endif; unset($_from); ?>]<?php else: ?>false<?php endif; ?>;
						var cc_parentPoints = <?php if ($this->_tpl_vars['parentPoints']): ?>[<?php $_from = $this->_tpl_vars['parentPoints']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['parentF'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['parentF']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['parent_point']):
        $this->_foreach['parentF']['iteration']++;
?>['<?php echo $this->_tpl_vars['parent_point']; ?>
']<?php if (! ($this->_foreach['parentF']['iteration'] == $this->_foreach['parentF']['total'])): ?>,<?php endif; ?><?php endforeach; endif; unset($_from); ?>]<?php else: ?>false<?php endif; ?>;
	
						<?php $_from = $this->_tpl_vars['plans']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['plan']):
?>
						plans[<?php echo $this->_tpl_vars['plan']['ID']; ?>
] = new Array();
						plans[<?php echo $this->_tpl_vars['plan']['ID']; ?>
]['Key'] = '<?php echo $this->_tpl_vars['plan']['Key']; ?>
';
						plans[<?php echo $this->_tpl_vars['plan']['ID']; ?>
]['Cross'] = <?php echo $this->_tpl_vars['plan']['Cross']; ?>
;
						<?php endforeach; endif; unset($_from); ?>
						
						<?php echo '
						
						$(document).ready(function(){
							flynax.treeLoadLevel(\'crossed\', \'crossedTree\');
							crossedTree(true, true);
						});
						
						'; ?>

						</script>
						<script type="text/javascript" src="<?php echo @RL_LIBS_URL; ?>
javascript/crossed.js"></script>
					<?php endif; ?>
					<!-- crossed categories end -->
					
					<?php echo rlHook::load(array('name' => 'addListingPreFields'), $this);?>


					<?php $_from = $this->_tpl_vars['form']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['group']):
?>
					<?php if ($this->_tpl_vars['group']['Group_ID']): ?>
						<?php if ($this->_tpl_vars['group']['Fields'] && $this->_tpl_vars['group']['Display']): ?>
							<?php $this->assign('hide', false); ?>
						<?php else: ?>
							<?php $this->assign('hide', true); ?>
						<?php endif; ?>
			
						<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'fieldset_header.tpl') : smarty_modifier_cat($_tmp, 'fieldset_header.tpl')), 'smarty_include_vars' => array('id' => $this->_tpl_vars['group']['Key'],'name' => $this->_tpl_vars['lang'][$this->_tpl_vars['group']['pName']])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
						<?php if ($this->_tpl_vars['group']['Fields']): ?>
							<?php if ($this->_tpl_vars['config']['listing_feilds_position'] == 2): ?>
							<table class="submit">
							<?php endif; ?>
							
							<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'field.tpl') : smarty_modifier_cat($_tmp, 'field.tpl')), 'smarty_include_vars' => array('fields' => $this->_tpl_vars['group']['Fields'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
							
							<?php if ($this->_tpl_vars['config']['listing_feilds_position'] == 2): ?>
							</table>
							<?php endif; ?>
						<?php else: ?>
							<?php echo $this->_tpl_vars['lang']['no_items_in_group']; ?>

						<?php endif; ?>
						<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'fieldset_footer.tpl') : smarty_modifier_cat($_tmp, 'fieldset_footer.tpl')), 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
					<?php else: ?>
						<?php if ($this->_tpl_vars['config']['listing_feilds_position'] == 2): ?>
						<table class="submit">
						<?php endif; ?>
						
						<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'field.tpl') : smarty_modifier_cat($_tmp, 'field.tpl')), 'smarty_include_vars' => array('fields' => $this->_tpl_vars['group']['Fields'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
						
						<?php if ($this->_tpl_vars['config']['listing_feilds_position'] == 2): ?>
						</table>
						<?php endif; ?>
					<?php endif; ?>
					<?php endforeach; endif; unset($_from); ?>
					
					<script type="text/javascript">
					<?php echo '
						
					$(document).ready(function(){
						flynax.mlTabs();
						'; ?>
<?php if ($this->_tpl_vars['config']['address_on_map']): ?>flynax.onMapHandler();<?php endif; ?><?php echo '
					});

					'; ?>

					</script>
					
					<!-- login/sing up form -->
					<?php if ($this->_tpl_vars['config']['add_listing_without_reg'] && ! $this->_tpl_vars['isLogin']): ?>
						<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'fieldset_header.tpl') : smarty_modifier_cat($_tmp, 'fieldset_header.tpl')), 'smarty_include_vars' => array('id' => 'authorization','name' => ((is_array($_tmp=((is_array($_tmp='<b>')) ? $this->_run_mod_handler('cat', true, $_tmp, $this->_tpl_vars['lang']['authorization']) : smarty_modifier_cat($_tmp, $this->_tpl_vars['lang']['authorization'])))) ? $this->_run_mod_handler('cat', true, $_tmp, '</b>') : smarty_modifier_cat($_tmp, '</b>')))));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
						
						<div class="auth">
							<table>
							<tr>
								<td class="side">
									<div class="lalign">
										<div class="caption"><?php echo $this->_tpl_vars['lang']['sign_in']; ?>
</div>
									    
									    <div class="name"><?php echo $this->_tpl_vars['lang']['username']; ?>
</div>
									    <input class="w180" type="text" name="login[username]" maxlength="25" value="<?php echo $_POST['login']['username']; ?>
" />
									    
									    <div class="name"><?php echo $this->_tpl_vars['lang']['password']; ?>
</div>
									    <input class="w180" type="password" name="login[password]" maxlength="25" />
									    
									    <div><span class="black_12"><?php echo $this->_tpl_vars['lang']['forgot_pass']; ?>
</span> <a target="_blank" title="<?php echo $this->_tpl_vars['lang']['remind_pass']; ?>
" class="brown_12" href="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pages']['remind']; ?>
.html<?php else: ?>?page=<?php echo $this->_tpl_vars['pages']['remind']; ?>
<?php endif; ?>"><?php echo $this->_tpl_vars['lang']['remind']; ?>
</a></div>
								    </div>
								</td>
								<td class="divider"><?php echo $this->_tpl_vars['lang']['or']; ?>
</td>
								<td class="side">
									<div class="lalign">
										<div class="caption"><?php echo $this->_tpl_vars['lang']['sign_up']; ?>
</div>
									    
									    <div class="name"><?php echo $this->_tpl_vars['lang']['your_name']; ?>
</div>
									    <input class="w180" type="text" name="register[name]" maxlength="100" value="<?php echo $_POST['register']['name']; ?>
" />
									    
									    <div class="name"><?php echo $this->_tpl_vars['lang']['your_email']; ?>
</div>
									    <input class="w180" type="text" name="register[email]" maxlength="150" value="<?php echo $_POST['register']['email']; ?>
"  />
								    </div>
								</td>
							</tr>
							</table>
						</div>
						
						<script type="text/javascript">
						<?php echo '
						
						$(document).ready(function(){
							$(\'input[name="register[name]"],input[name="register[email]"]\').keydown(function(){
								$(\'input[name="login[username]"],input[name="login[password]"]\').val(\'\');
							});
							$(\'input[name="login[username]"],input[name="login[password]"]\').keydown(function(){
								$(\'input[name="register[name]"],input[name="register[email]"]\').val(\'\');
							});
						});
						
						'; ?>

						</script>
						
						<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'fieldset_footer.tpl') : smarty_modifier_cat($_tmp, 'fieldset_footer.tpl')), 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
					<?php endif; ?>
					<!-- login/sing up form end -->
					
					<?php if ($this->_tpl_vars['config']['listing_feilds_position'] == 2): ?>
						<table class="submit">
						<?php if ($this->_tpl_vars['config']['security_img_add_listing']): ?>
						<tr>
							<td><?php echo $this->_tpl_vars['lang']['security_code']; ?>
</td>
							<td><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => RL_PLUGINS .'reCaptcha'. RL_DS .'reCaptcha.tpl', 'smarty_include_vars' => array('no_caption' => true)));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?></td>
						</tr>
						<?php endif; ?>
						<tr>
							<td class="name<?php if ($this->_tpl_vars['config']['security_img_add_listing']): ?> button<?php endif; ?>"><a href="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
/<?php echo $this->_tpl_vars['category']['Path']; ?>
/<?php echo $this->_tpl_vars['steps']['plan']['path']; ?>
.html<?php else: ?>?page=<?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
&amp;id=<?php echo $this->_tpl_vars['category']['ID']; ?>
&amp;step=<?php echo $this->_tpl_vars['steps']['plan']['path']; ?>
<?php endif; ?>" class="dark_12"><?php if (@RL_LANG_DIR == 'ltr'): ?>&larr;<?php else: ?>&rarr;<?php endif; ?> <?php echo $this->_tpl_vars['lang']['perv_step']; ?>
</a></td>
							<td class="field<?php if ($this->_tpl_vars['config']['security_img_add_listing']): ?> button<?php endif; ?>"><span class="arrow"><input type="submit" value="<?php echo $this->_tpl_vars['lang']['next_step']; ?>
" id="form_submit" /><label for="form_submit" class="right">&nbsp;</label></span></td>
						</tr>
						</table>
					<?php else: ?>
						<?php if ($this->_tpl_vars['config']['security_img_add_listing']): ?>
							<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'captcha.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
						<?php endif; ?>
						
						<a href="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
/<?php echo $this->_tpl_vars['category']['Path']; ?>
/<?php echo $this->_tpl_vars['steps']['plan']['path']; ?>
.html<?php else: ?>?page=<?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
&amp;id=<?php echo $this->_tpl_vars['category']['ID']; ?>
&amp;step=<?php echo $this->_tpl_vars['steps']['plan']['path']; ?>
<?php endif; ?>" class="dark_12"><?php if (@RL_LANG_DIR == 'ltr'): ?>&larr;<?php else: ?>&rarr;<?php endif; ?> <?php echo $this->_tpl_vars['lang']['perv_step']; ?>
</a>
						<span class="arrow"><input type="submit" value="<?php echo $this->_tpl_vars['lang']['next_step']; ?>
" id="form_submit" /><label for="form_submit" class="right">&nbsp;</label></span>
					<?php endif; ?>
					
				</form>
			</div>
			<?php endif; ?>
			<!-- fill in form end -->
			
			<!-- add photo -->
			<?php if ($this->_tpl_vars['cur_step'] == 'photo'): ?>
			<div class="area_photo step_area hide">
				<div class="caption"><?php echo $this->_tpl_vars['lang']['add_photo']; ?>
</div>
				
				<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'photo_manager.tpl') : smarty_modifier_cat($_tmp, 'photo_manager.tpl')), 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
				
				<form method="post" onsubmit="return submit_photo_step();" action="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
/<?php echo $this->_tpl_vars['category']['Path']; ?>
/<?php echo $this->_tpl_vars['steps'][$this->_tpl_vars['cur_step']]['path']; ?>
.html<?php else: ?>?page=<?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
&amp;id=<?php echo $this->_tpl_vars['category']['ID']; ?>
&amp;step=<?php echo $this->_tpl_vars['steps'][$this->_tpl_vars['cur_step']]['path']; ?>
<?php endif; ?>">
					<input type="hidden" name="step" value="photo" />
					<table class="submit">
					<tr>
						<td class="name button"><a href="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
/<?php echo $this->_tpl_vars['category']['Path']; ?>
/<?php echo $this->_tpl_vars['prev_step']['path']; ?>
.html<?php else: ?>?page=<?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
&amp;id=<?php echo $this->_tpl_vars['category']['ID']; ?>
&amp;step=<?php echo $this->_tpl_vars['prev_step']['path']; ?>
<?php endif; ?>" class="dark_12"><?php if (@RL_LANG_DIR == 'ltr'): ?>&larr;<?php else: ?>&rarr;<?php endif; ?> <?php echo $this->_tpl_vars['lang']['perv_step']; ?>
</a></td>
						<td class="field button"><span class="arrow"><input type="submit" value="<?php echo $this->_tpl_vars['lang']['next_step']; ?>
" id="photo_submit" /><label for="photo_submit" class="right">&nbsp;</label></span></td>
					</tr>
					</table>
				</form>
				
				<script type="text/javascript">
				<?php echo 'var crop_handler = function(){};'; ?>

				</script>
			</div>
			<?php endif; ?>
			<!-- add photo end -->
			
			<!-- add video -->
			<?php if ($this->_tpl_vars['cur_step'] == 'video'): ?>
			<div id="area_video" class="area_video step_area hide">
				<div class="caption"><?php echo $this->_tpl_vars['lang']['add_video']; ?>
</div>
				
				<div id="video_upload_dom">
					<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'video_upload.tpl') : smarty_modifier_cat($_tmp, 'video_upload.tpl')), 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
				</div>
				
				<?php if ($this->_tpl_vars['videos']): ?>
					<script type="text/javascript" src="<?php echo @RL_LIBS_URL; ?>
player/flowplayer.js"></script>
					<script type="text/javascript" src="<?php echo @RL_LIBS_URL; ?>
jquery/jquery.fancybox.js"></script>

					<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'fieldset_header.tpl') : smarty_modifier_cat($_tmp, 'fieldset_header.tpl')), 'smarty_include_vars' => array('id' => 'uploadList','name' => $this->_tpl_vars['lang']['listing_video'],'tall' => true)));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
						<?php $this->assign('replace', ('{')."key".('}')); ?>
						<ul class="thumbnails inline">
						<?php $_from = $this->_tpl_vars['videos']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['video']):
?>
							<li id="video_<?php echo $this->_tpl_vars['video']['ID']; ?>
" class="active">
								<?php if ($this->_tpl_vars['video']['Type'] == 'local'): ?>
									<img class="item" src="<?php echo @RL_FILES_URL; ?>
<?php echo $this->_tpl_vars['video']['Preview']; ?>
" alt="" />
								<?php else: ?>
									<img class="item" src="<?php echo ((is_array($_tmp=$this->_tpl_vars['l_youtube_thumbnail'])) ? $this->_run_mod_handler('replace', true, $_tmp, $this->_tpl_vars['replace'], $this->_tpl_vars['video']['Preview']) : smarty_modifier_replace($_tmp, $this->_tpl_vars['replace'], $this->_tpl_vars['video']['Preview'])); ?>
" alt="" />
								<?php endif; ?>
								<img src="<?php echo $this->_tpl_vars['rlTplBase']; ?>
img/blank.gif" class="delete" alt="<?php echo $this->_tpl_vars['lang']['delete']; ?>
" title="<?php echo $this->_tpl_vars['lang']['delete']; ?>
" />
							
								<script type="text/javascript">//<![CDATA[
								/* load video handler */
								<?php if ($this->_tpl_vars['video']['Type'] == 'local'): ?>
								<?php echo '
								
								$(\'#video_'; ?>
<?php echo $this->_tpl_vars['video']['ID']; ?>
<?php echo ' img.item\').click(function(){
									$.fancybox({
										padding			: 0,
										autoScale		: false,
										transitionIn	: \'none\',
										transitionOut	: \'none\',
										width			: '; ?>
<?php echo $this->_tpl_vars['config']['video_width']; ?>
<?php echo ',
										height			: '; ?>
<?php echo $this->_tpl_vars['config']['video_height']; ?>
<?php echo ',
										content			: \'<a href="'; ?>
<?php echo @RL_FILES_URL; ?>
<?php echo $this->_tpl_vars['video']['Video']; ?>
<?php echo '" style="display:block;width:'; ?>
<?php echo $this->_tpl_vars['config']['video_width']; ?>
<?php echo 'px;height:'; ?>
<?php echo $this->_tpl_vars['config']['video_height']; ?>
<?php echo 'px;" id="player"></a>\',
										onComplete:		function(){
											flowplayer(\'player\', {src: \''; ?>
<?php echo @RL_LIBS_URL; ?>
<?php echo 'player/flowplayer-3.2.7.swf\', wmode: \'transparent\'});
										},
										onClosed:		function(){
											$f().stop();
										}
									});
								});
								
								'; ?>

								<?php else: ?>
								<?php echo '
								
								$(\'#video_'; ?>
<?php echo $this->_tpl_vars['video']['ID']; ?>
<?php echo ' img.item\').click(function(){
									$.fancybox({
										padding			: 0,
										autoScale		: false,
										transitionIn	: \'none\',
										transitionOut	: \'none\',
										width			: '; ?>
<?php echo $this->_tpl_vars['config']['video_width']; ?>
<?php echo ',
										height			: '; ?>
<?php echo $this->_tpl_vars['config']['video_height']; ?>
<?php echo ',
										href			: \''; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['l_youtube_direct'])) ? $this->_run_mod_handler('replace', true, $_tmp, $this->_tpl_vars['replace'], $this->_tpl_vars['video']['Preview']) : smarty_modifier_replace($_tmp, $this->_tpl_vars['replace'], $this->_tpl_vars['video']['Preview'])); ?>
<?php echo '\',
										type			: \'swf\',
										swf				: {
											wmode		: \'transparent\',
											allowfullscreen	: true
										}
									});
								});
								
								'; ?>

								<?php endif; ?>
								//]]>
								</script>
							</li>
						<?php endforeach; endif; unset($_from); ?>
						</ul>
						<div class="clear"></div>
					<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'fieldset_footer.tpl') : smarty_modifier_cat($_tmp, 'fieldset_footer.tpl')), 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
				<?php endif; ?>
				
				<script type="text/javascript">//<![CDATA[
				var video_listing_id = <?php echo $_SESSION['add_listing']['listing_id']; ?>
;
				var sort_save = false;
				<?php echo '
				
				/* delete video handler */
				$(\'#area_video ul.thumbnails img.delete\').each(function(){
					$(this).flModal({
						caption: \''; ?>
<?php echo $this->_tpl_vars['lang']['warning']; ?>
<?php echo '\',
						content: \''; ?>
<?php echo $this->_tpl_vars['lang']['delete_confirm']; ?>
<?php echo '\',
						prompt: \'xajax_deleteVideo(\'+ $(this).parent().attr(\'id\').split(\'_\')[1] +\', "\'+ $(this).parent().attr(\'id\') +\'")\',
						width: \'auto\',
						height: \'auto\'
					});
				});
				
				$(\'div#area_video ul.thumbnails\').sortable({
					placeholder: \'hover\',
					stop: function(event, obj){
						/* save sorting */
						var sort = \'\';
						var count = 0;
						$(\'div#area_video ul.thumbnails li\').each(function(){
							var id = $(this).attr(\'id\').split(\'_\')[1];
							count++;
							var pos = $(\'div#area_video ul.thumbnails li\').index($(this))+1;
							sort += id+\',\'+pos+\';\';
						});
						
						if ( sort.length > 0 && count > 1 && sort_save != sort )
						{
							sort_save = sort;
							sort = rtrim(sort, \';\');
							xajax_reorderVideo(video_listing_id, sort);
						}
					}
				});
				
				'; ?>

				//]]>
				</script>
				
				<form method="post" action="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
/<?php echo $this->_tpl_vars['category']['Path']; ?>
/<?php echo $this->_tpl_vars['steps'][$this->_tpl_vars['cur_step']]['path']; ?>
.html<?php else: ?>?page=<?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
&amp;id=<?php echo $this->_tpl_vars['category']['ID']; ?>
&amp;step=<?php echo $this->_tpl_vars['steps'][$this->_tpl_vars['cur_step']]['path']; ?>
<?php endif; ?>">
					<input type="hidden" name="step" value="video" />
					<input type="hidden" name="redirect" value="1" />
					<table class="submit">
					<tr>
						<td class="name button"><a href="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
/<?php echo $this->_tpl_vars['category']['Path']; ?>
/<?php echo $this->_tpl_vars['prev_step']['path']; ?>
.html<?php else: ?>?page=<?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
&amp;id=<?php echo $this->_tpl_vars['category']['ID']; ?>
&amp;step=<?php echo $this->_tpl_vars['prev_step']['path']; ?>
<?php endif; ?>" class="dark_12"><?php if (@RL_LANG_DIR == 'ltr'): ?>&larr;<?php else: ?>&rarr;<?php endif; ?> <?php echo $this->_tpl_vars['lang']['perv_step']; ?>
</a></td>
						<td class="field button"><span class="arrow"><input type="submit" value="<?php echo $this->_tpl_vars['lang']['next_step']; ?>
" id="video_submit" /><label for="video_submit" class="right">&nbsp;</label></span></td>
					</tr>
					</table>
				</form>
			</div>
			<?php endif; ?>
			<!-- add video end -->
			
			<!-- checkout -->
			<?php if ($this->_tpl_vars['cur_step'] == 'checkout'): ?>
			<div class="area_checkout step_area hide">
				<div class="caption"><?php echo $this->_tpl_vars['lang']['checkout']; ?>
</div>
				
				<div class="dark" style="padding-bottom: 5px;"><?php echo $this->_tpl_vars['lang']['checkout_step_info']; ?>
</div>
				
				<form method="post" action="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
/<?php echo $this->_tpl_vars['category']['Path']; ?>
/<?php echo $this->_tpl_vars['steps'][$this->_tpl_vars['cur_step']]['path']; ?>
.html<?php else: ?>?page=<?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
&amp;id=<?php echo $this->_tpl_vars['category']['ID']; ?>
&amp;step=<?php echo $this->_tpl_vars['steps'][$this->_tpl_vars['cur_step']]['path']; ?>
<?php endif; ?>">
					<input type="hidden" name="step" value="checkout" />
					
					<ul id="payment_gateways">
						<?php if ($this->_tpl_vars['config']['use_paypal']): ?>
						<li>
							<img alt="" src="<?php echo @RL_LIBS_URL; ?>
payment/paypal/paypal.png" />
							<p><input <?php if ($_POST['gateway'] == 'paypal' || ! $_POST['gateway']): ?>checked="checked"<?php endif; ?> type="radio" name="gateway" value="paypal" /></p>
						</li>
						<?php endif; ?>
						<?php if ($this->_tpl_vars['config']['use_2co']): ?>
						<li>
							<img alt="" src="<?php echo @RL_LIBS_URL; ?>
payment/2co/2co.png" />
							<p><input <?php if ($_POST['gateway'] == '2co'): ?>checked="checked"<?php endif; ?> type="radio" name="gateway" value="2co" /></p>
						</li>
						<?php endif; ?>
						
						<?php echo rlHook::load(array('name' => 'paymentGateway'), $this);?>

					</ul>
				
					<table class="submit">
					<tr>
						<td class="name button"><a href="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
/<?php echo $this->_tpl_vars['category']['Path']; ?>
/<?php echo $this->_tpl_vars['prev_step']['path']; ?>
.html<?php else: ?>?page=<?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
&amp;id=<?php echo $this->_tpl_vars['category']['ID']; ?>
&amp;step=<?php echo $this->_tpl_vars['prev_step']['path']; ?>
<?php endif; ?>" class="dark_12"><?php if (@RL_LANG_DIR == 'ltr'): ?>&larr;<?php else: ?>&rarr;<?php endif; ?> <?php echo $this->_tpl_vars['lang']['perv_step']; ?>
</a></td>
						<td class="field button"><span class="arrow"><input type="submit" value="<?php echo $this->_tpl_vars['lang']['next_step']; ?>
" id="checkout_submit" /><label for="checkout_submit" class="right">&nbsp;</label></span></td>
					</tr>
					</table>
				</form>
				
				<script type="text/javascript">
					flynax.paymentGateway();
				</script>
			</div>
			<?php endif; ?>
			<!-- checkout end -->
			
			<!-- done -->
			<?php if ($this->_tpl_vars['cur_step'] == 'done'): ?>
			<div class="area_done step_area hide">
				<div class="caption"><?php echo $this->_tpl_vars['lang']['reg_done']; ?>
</div>
				
				<div class="info"><?php if ($this->_tpl_vars['config']['listing_auto_approval']): ?><?php echo $this->_tpl_vars['lang']['notice_after_listing_adding_auto']; ?>
<?php else: ?><?php echo $this->_tpl_vars['lang']['notice_after_listing_adding']; ?>
<?php endif; ?></div>
				<span class="dark">
					<?php $this->assign('replace', ((is_array($_tmp=((is_array($_tmp='<a href="')) ? $this->_run_mod_handler('cat', true, $_tmp, $this->_tpl_vars['return_link']) : smarty_modifier_cat($_tmp, $this->_tpl_vars['return_link'])))) ? $this->_run_mod_handler('cat', true, $_tmp, '">$1</a>') : smarty_modifier_cat($_tmp, '">$1</a>'))); ?>
					<?php echo ((is_array($_tmp=$this->_tpl_vars['lang']['add_one_more_listing'])) ? $this->_run_mod_handler('regex_replace', true, $_tmp, '/\[(.*)\]/', $this->_tpl_vars['replace']) : smarty_modifier_regex_replace($_tmp, '/\[(.*)\]/', $this->_tpl_vars['replace'])); ?>

				</span>
			</div>
			<?php endif; ?>
			<!-- done end -->
			
			<script type="text/javascript">
			<?php if ($this->_tpl_vars['cur_step']): ?>
				flynax.switchStep('<?php echo $this->_tpl_vars['cur_step']; ?>
');
			<?php endif; ?>
			
			<?php echo '
			$(document).ready(function(){
				$("input.numeric").numeric();
			});
			'; ?>

			</script>
		<?php endif; ?>
		
	</div>

<?php endif; ?>

<?php echo rlHook::load(array('name' => 'addListingBottomTpl'), $this);?>


<!-- add listing end -->